<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin think\Model
 */
class jyn extends Model
{   
    // 选择数据库
    protected $table='school';

    /**
     * 分页查询
     * 
     */
    
    public function pageShow(){
        return self::paginate(20);
    }
    /**
     * 添加
     *  */ 
    public function addOne($data){
        return self::insert($data);
    }
    /*
    *获取一条数据
    */ 
    public function getOne($where){
        return self::where($where)->find();
    }
    /**
     * 修改一条数据
     * 
     */
    public function updOne($where,$data){
        return self::where($where)->save($data);
    }
    /**
     * 删除一条数据
     */
    public function delOne($where){
        return self::where($where)->delete();
    }
}
